package com.smx.util;

/**
 * @ClassName GenderUtil
 * @Description TODO
 * @Author moses
 * @Date 2021/5/9
 **/
public class GenderUtil {
    public static String getGenderStr(int gender) {
        if (gender == 0) {
            return "男";
        } else if (gender == 1) {
            return "女";
        } else {
            return "未知";
        }
    }

    public static int getGenderCode(String gender) {
        if ("男".equals(gender)) {
            return 0;
        } else if ("女".equals(gender)) {
            return 1;
        } else {
            return 2;
        }
    }
}
